package com.ws.entity.test03;

/**
 * @author 王硕
 * @version jdk21
 * @className FingerGuessingGame
 * @description
 * @date 2024/11/5 20:27
 */
public class FingerGuessingGame {
    public personA personA;
    public personB personB;
    public void result(){
        if (personA.choices==personB.choices){
            System.out.println("平局");
        }else if (personA.choices == 1) {
            if (personB.choices == 2) {
                System.out.println(personB.name + "赢了");
            } else if (personB.choices == 3) {
                System.out.println(personA.name + "赢了");
            }
        } else if (personA.choices == 2) {
            if (personB.choices == 1) {
                System.out.println(personA.name + "赢了");
            } else if (personB.choices == 3) {
                System.out.println(personB.name + "赢了");
            }
        } else if (personA.choices == 3) {
            if (personB.choices == 1) {
                System.out.println(personB.name + "赢了");
            } else if (personB.choices == 2) {
                System.out.println(personA.name + "赢了");
            }
        }
    }
}
